home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GETCWD.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  258 b   |  17 lines

  1. /* getcwd.c function, from page 379 turbo c bible */
  2. #include<stdio.h>
  3. #include<dir.h>
  4. main()
  5. {
  6.     char pathname[81];
  7.  
  8.  
  9.     if(getcwd(pathname, 80) == NULL)
  10.     {
  11.         perror("error in getcwd");
  12.     }
  13.     else
  14.     {
  15.         printf("current dir: %s\n", pathname);
  16.     }
  17. }